.class public Lcom/estrongs/android/ui/preference/CustomEditTextPreference;
.super Landroidx/preference/EditTextPreference;
.source "CustomEditTextPreference.java"


# instance fields
.field private a:Lcom/estrongs/android/ui/dialog/q;

.field private b:Landroid/widget/EditText;

.field private c:Lcom/estrongs/android/ui/theme/b;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    const/4 v0, 0x0

    .line 1
    invoke-direct {p0, p1, v0}, Lcom/estrongs/android/ui/preference/CustomEditTextPreference;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1

    const v0, 0x1010092

    .line 2
    invoke-direct {p0, p1, p2, v0}, Lcom/estrongs/android/ui/preference/CustomEditTextPreference;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 2

    .line 3
    invoke-direct {p0, p1, p2, p3}, Landroidx/preference/EditTextPreference;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 4
    invoke-static {}, Lcom/estrongs/android/ui/theme/b;->r()Lcom/estrongs/android/ui/theme/b;

    move-result-object p3

    iput-object p3, p0, Lcom/estrongs/android/ui/preference/CustomEditTextPreference;->c:Lcom/estrongs/android/ui/theme/b;

    .line 5
    new-instance p3, Landroid/widget/EditText;

    invoke-direct {p3, p1, p2}, Landroid/widget/EditText;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    iput-object p3, p0, Lcom/estrongs/android/ui/preference/CustomEditTextPreference;->b:Landroid/widget/EditText;

    const p2, 0x1020003

    .line 6
    invoke-virtual {p3, p2}, Landroid/widget/EditText;->setId(I)V

    .line 7
    iget-object p2, p0, Lcom/estrongs/android/ui/preference/CustomEditTextPreference;->b:Landroid/widget/EditText;

    const/4 p3, 0x1

    invoke-virtual {p2, p3}, Landroid/widget/EditText;->setEnabled(Z)V

    .line 8
    iget-object p2, p0, Lcom/estrongs/android/ui/preference/CustomEditTextPreference;->b:Landroid/widget/EditText;

    const v0, 0x7f080813

    invoke-virtual {p2, v0}, Landroid/widget/EditText;->setBackgroundResource(I)V

    .line 9
    iget-object p2, p0, Lcom/estrongs/android/ui/preference/CustomEditTextPreference;->b:Landroid/widget/EditText;

    iget-object v0, p0, Lcom/estrongs/android/ui/preference/CustomEditTextPreference;->c:Lcom/estrongs/android/ui/theme/b;

    const v1, 0x7f060294

    invoke-virtual {v0, v1}, Lcom/estrongs/android/ui/theme/b;->a(I)I

    move-result v0

    invoke-virtual {p2, v0}, Landroid/widget/EditText;->setTextColor(I)V

    .line 10
    iget-object p2, p0, Lcom/estrongs/android/ui/preference/CustomEditTextPreference;->b:Landroid/widget/EditText;

    invoke-virtual {p2, p3}, Landroid/widget/EditText;->setSelectAllOnFocus(Z)V

    .line 11
    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object p1

    const p2, 0x7f0701e8

    invoke-virtual {p1, p2}, Landroid/content/res/Resources;->getDimension(I)F

    move-result p1

    float-to-int p1, p1

    .line 12
    iget-object p2, p0, Lcom/estrongs/android/ui/preference/CustomEditTextPreference;->b:Landroid/widget/EditText;

    const/4 p3, 0x0

    invoke-virtual {p2, p1, p3, p1, p3}, Landroid/widget/EditText;->setPadding(IIII)V

    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/ui/preference/CustomEditTextPreference;)Landroid/widget/EditText;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/ui/preference/CustomEditTextPreference;->b:Landroid/widget/EditText;

    return-object p0
.end method


# virtual methods
.method protected a(Landroid/view/View;)V
    .locals 2

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/ui/preference/CustomEditTextPreference;->b:Landroid/widget/EditText;

    .line 3
    invoke-virtual {p0}, Landroidx/preference/EditTextPreference;->getText()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 4
    invoke-virtual {v0}, Landroid/widget/EditText;->getParent()Landroid/view/ViewParent;

    move-result-object v1

    if-eq v1, p1, :cond_1

    if-eqz v1, :cond_0

    .line 5
    check-cast v1, Landroid/view/ViewGroup;

    invoke-virtual {v1, v0}, Landroid/view/ViewGroup;->removeView(Landroid/view/View;)V

    .line 6
    :cond_0
    invoke-virtual {p0, p1, v0}, Lcom/estrongs/android/ui/preference/CustomEditTextPreference;->a(Landroid/view/View;Landroid/widget/EditText;)V

    :cond_1
    return-void
.end method

.method protected a(Landroid/view/View;Landroid/widget/EditText;)V
    .locals 2

    const v0, 0x7f0903db

    .line 7
    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/view/ViewGroup;

    if-eqz p1, :cond_0

    const/4 v0, -0x1

    const/4 v1, -0x2

    .line 8
    invoke-virtual {p1, p2, v0, v1}, Landroid/view/ViewGroup;->addView(Landroid/view/View;II)V

    :cond_0
    return-void
.end method

.method protected a()Z
    .locals 1

    const/4 v0, 0x1

    return v0
.end method

.method protected b()Landroid/view/View;
    .locals 3

    .line 1
    invoke-virtual {p0}, Landroidx/preference/Preference;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/estrongs/android/pop/esclasses/h;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    const v1, 0x7f0c00ae

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    return-object v0
.end method

.method public c()V
    .locals 3

    .line 1
    invoke-virtual {p0}, Landroidx/preference/Preference;->getContext()Landroid/content/Context;

    move-result-object v0

    .line 2
    new-instance v1, Lcom/estrongs/android/ui/dialog/q$n;

    invoke-direct {v1, v0}, Lcom/estrongs/android/ui/dialog/q$n;-><init>(Landroid/content/Context;)V

    .line 3
    invoke-virtual {p0}, Landroidx/preference/DialogPreference;->getDialogTitle()Ljava/lang/CharSequence;

    move-result-object v0

    invoke-virtual {v1, v0}, Lcom/estrongs/android/ui/dialog/q$n;->b(Ljava/lang/CharSequence;)Lcom/estrongs/android/ui/dialog/q$n;

    .line 4
    invoke-virtual {p0}, Landroidx/preference/DialogPreference;->getPositiveButtonText()Ljava/lang/CharSequence;

    move-result-object v0

    new-instance v2, Lcom/estrongs/android/ui/preference/CustomEditTextPreference$b;

    invoke-direct {v2, p0}, Lcom/estrongs/android/ui/preference/CustomEditTextPreference$b;-><init>(Lcom/estrongs/android/ui/preference/CustomEditTextPreference;)V

    invoke-virtual {v1, v0, v2}, Lcom/estrongs/android/ui/dialog/q$n;->b(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Lcom/estrongs/android/ui/dialog/q$n;

    .line 5
    invoke-virtual {p0}, Landroidx/preference/DialogPreference;->getNegativeButtonText()Ljava/lang/CharSequence;

    move-result-object v0

    new-instance v2, Lcom/estrongs/android/ui/preference/CustomEditTextPreference$a;

    invoke-direct {v2, p0}, Lcom/estrongs/android/ui/preference/CustomEditTextPreference$a;-><init>(Lcom/estrongs/android/ui/preference/CustomEditTextPreference;)V

    invoke-virtual {v1, v0, v2}, Lcom/estrongs/android/ui/dialog/q$n;->a(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Lcom/estrongs/android/ui/dialog/q$n;

    .line 6
    invoke-virtual {p0}, Lcom/estrongs/android/ui/preference/CustomEditTextPreference;->b()Landroid/view/View;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 7
    invoke-virtual {p0, v0}, Lcom/estrongs/android/ui/preference/CustomEditTextPreference;->a(Landroid/view/View;)V

    .line 8
    invoke-virtual {v1, v0}, Lcom/estrongs/android/ui/dialog/q$n;->a(Landroid/view/View;)Lcom/estrongs/android/ui/dialog/q$n;

    goto :goto_0

    .line 9
    :cond_0
    invoke-virtual {p0}, Landroidx/preference/DialogPreference;->getDialogMessage()Ljava/lang/CharSequence;

    move-result-object v0

    invoke-virtual {v1, v0}, Lcom/estrongs/android/ui/dialog/q$n;->a(Ljava/lang/CharSequence;)Lcom/estrongs/android/ui/dialog/q$n;

    .line 10
    :goto_0
    invoke-virtual {v1}, Lcom/estrongs/android/ui/dialog/q$n;->a()Lcom/estrongs/android/ui/dialog/q;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/android/ui/preference/CustomEditTextPreference;->a:Lcom/estrongs/android/ui/dialog/q;

    .line 11
    invoke-virtual {p0}, Lcom/estrongs/android/ui/preference/CustomEditTextPreference;->a()Z

    move-result v1

    if-eqz v1, :cond_1

    .line 12
    invoke-virtual {v0}, Lcom/estrongs/android/ui/dialog/q;->requestInputMethod()V

    .line 13
    :cond_1
    iget-object v1, p0, Lcom/estrongs/android/ui/preference/CustomEditTextPreference;->b:Landroid/widget/EditText;

    invoke-virtual {v1}, Landroid/widget/EditText;->requestFocus()Z

    .line 14
    invoke-virtual {v0}, Lcom/estrongs/android/ui/dialog/q;->show()V

    return-void
.end method
